import { RouterModule } from '@angular/router';
import { Routes } from '@angular/router';
import { AComponent } from './acomponent/a.component';
import { BComponent } from './bcomponent/b.component';
import { CComponent } from './ccomponent/c.component';
import { OneFormComponent } from '../formsdemo/one.component';
import { Outlet } from './outlet/outlet.component'

export const routes: Routes = [
    {
        path: 'form',
        component: OneFormComponent
    },
    {
        path: 'a', // 路由路径 注意这里不需要/前导是基于基根来设置的
        component: AComponent // 直接加载组件没有懒加载
    },
    {
        path: 'b',
        component: BComponent
    }, {
        path: '',
        redirectTo: '/a',
        pathMatch: 'full' //pathMatch：为字符串默认为前缀匹配 "prefix"; "full" 为完全匹配。
    }, {
        path: 'c/:id',// 路由规则
        component: CComponent,
        data: { title: 'admin' }
    }, {
        path: 'lazy',
        loadChildren: 'app/routerdemo/lazy/m0/mz.module#MzModule'
    },
    {
        path : 'outlet',
        component : Outlet,
        outlet : 'plugin'
    }
];


